const req = require.context('./imgs', false, /\.svg$/)

const requireAll = (requireContext: any) => {
    return requireContext.keys().map(requireContext)
}

requireAll(req)